Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(py314): Replace deprecated pkgutil.find_loader #1888

Merged
merged 2 commits into from
Oct 17, 2024

Conversation

effigies
Copy link
Contributor

This PR removes pkgutil.find_loader() and replaces it with importlib.util.find_spec(). find_loader was deprecated in Python 3.12 and will be removed in 3.14. find_spec has been present since Python 3.4.

Both functions return None if the module loader cannot be found. For its use in this project, this is sufficient and no translation of the return value is needed.

python/pyfury/util.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@chaokunyang chaokunyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@chaokunyang chaokunyang changed the title rf(py314): Replace deprecated pkgutil.find_loader chore(py314): Replace deprecated pkgutil.find_loader Oct 17, 2024
@chaokunyang chaokunyang merged commit c578cb2 into apache:main Oct 17, 2024
37 of 38 checks passed
@effigies effigies deleted the rf/drop-pkgutil-find_loader branch October 17, 2024 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants